// by Tankbuster
//#define __DEBUG__
private ["_vehicle", "_poss","_endtime", "_mpos", "_epos"];
#include "x_setup.sqf"

_mpos = markerPos QGVAR(sm_590_1);
_mpos set [2,0];
_epos = markerPos QGVAR(sm_590);
GVAR(x_sm_pos) = [_epos]; // index: 90, Airdrop container to FIA resistance near Cap Kategidis
GVAR(x_sm_type) = "deliver"; // "normal"

#ifdef __SMMISSIONS_MARKER__
if (true) exitWith {};
#endif
_endtime = (time + (10 * 60));
if (X_Client && {!GVAR(IS_HC_CLIENT)}) then {
	GVAR(cur_sm_txt) = (localize "STR_DOM_MISSIONSTRING_5054");
	GVAR(current_mission_resolved_text) = (localize "STR_DOM_MISSIONSTRING_5055");
};

if (call FUNC(checkSHC)) then {
	__Poss
	_vehicle = createVehicle [GVAR(bigcontainer), _mpos, [], 0, "NONE"];
	_vehicle setPos _mpos;
	_vehicle setVectorUp [0,0,1];
	
	_vehicle call FUNC(addKilledEHSM);
	waitUntil {sleep 5;getPos _vehicle select 2 > 10};//wait until the box is picked up.
	sleep 12.999;
	//["specops", 1, "basic", 2, _poss,0] spawn FUNC(CreateInf);
	[_vehicle, _epos, _endtime] spawn FUNC(delivercontainer);
};
